home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-10 | 828 b | 23 lines | [TEXT/KAHL] |
- // This is taken from TN 228. TN 212 recommends using this at the main
- // entry point of all INITs and external routines.
-
-
- pascal void FixPC( void )
- = {0x41FA, 0x000A, /* LEA *+$000C,A0 */
- 0x2008, /* MOVE.L A0,D0 */
- 0xA055, /* _StripAddress */
- 0x2040, /* MOVEA.L D0,A0 */
- 0x4ED0}; /* JMP (A0) ;jmps to next instruction */
-
- // This version is equivalent, but is for inclusion in asm {}.
- // The reason for using A1 rather than A0 is so as not to confuse the
- // CODE editor in ResEdit.
-
- #define FIXPC \
- LEA @fixed_pc, A1\
- move.L A1, D0\
- StripAddress\
- moveA.L D0, A1\
- jmp (A1)\
- @fixed_pc
-